/* eslint-disable vue/name-property-casing */
<template>
<div id="content">
    <canvas ref="can" width="1280" height="800"></canvas>
</div>
</template>

<script>
import { draw, getTrainInfos } from '@/api/trains'
export default {
  data() {
    return {
      count: 1,
      items: []
    }
  },
  mounted: function() {
    this.getList()
    draw(this.$refs.can)
  },
  methods: {
    getList() {
      getTrainInfos().then(response => {
        this.items = response.list
        this.count = response.count
      })
    }
  }}
</script>

<style lang="css" scoped>
    
</style>